AMD IOMMU: Support IOAPIC IDs larger than 128
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Mon, 12 Dec 2016 16:43:34 +0000 (17:43 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 12 Dec 2016 16:43:34 +0000 (17:43 +0100)
commitf948ce4371cd935d0075d8c60309660bdd5ca178
tree40d8cada636d7acbb0f3774658926470661b97d2
parent060be905bb3c2f3677f6ebbdfad186095e8fdf39
AMD IOMMU: Support IOAPIC IDs larger than 128

Currently, the driver uses the APIC ID to index into the ioapic_sbdf array.
The current MAX_IO_APICS is 128, which causes the driver initialization
to fail on the system with IOAPIC ID >= 128.

Instead, this patch adds APIC ID in the struct ioapic_sbdf,
which is used to match the entry when searching through the array.

Also, this patch removes the use of ioapic_cmdline bit-map, which is
used to track the ivrs_ioapic options via command line.
Instead, it introduces the cmdline flag in the struct ioapic_sbdf,
to identify if the entry is created during ivrs_ioapic command-line parsing.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/amd/iommu_acpi.c
xen/drivers/passthrough/amd/iommu_intr.c
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h